home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 21 / CU Amiga Magazine's Super CD-ROM 21 (1998)(EMAP Images)(GB)[!][issue 1998-04].iso / CUCD / Games / ADoom / ADoom_src / test_fixed.c < prev    next >
Encoding:
C/C++ Source or Header  |  1998-01-26  |  352 b   |  17 lines

  1. #include <stdio.h>
  2. #include "m_fixed.h"
  3. #include "m_swap.h"
  4.  
  5. int main (void)
  6. {
  7.   fixed_t a, b, c;
  8.  
  9.   a = 0x7fff0000;
  10.   b = 0xffffffff;
  11.   c = FixedDiv (a, b);
  12.   printf ("%08x\n", c);
  13.  
  14.   printf ("%08x %08x %08x %08x\n", (int)SWAPSHORT(0x0102), (int)SWAPSHORT(0xff01),
  15.                                    (int)SWAPSHORT(0x7fff), (int)SWAPSHORT(0x8090));
  16. }
  17.